﻿using JTTD.Common.Enum;
using JTTD.Common.Helper;
using System;

namespace JTTD.Domain.Dtos.Coupon.Response
{
    /// <summary>
    /// 优惠券信息
    /// </summary>
    public  class CouponInfoResponseDto:BaseResponseDto
    {
        /// <summary>
        /// 优惠券金额
        /// </summary>
        public decimal Amount { get; set; }
        /// <summary>
        /// 开始有效时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 开始有效时间
        /// </summary>
        public string StartTimeStr => StartTime.ToString("yyyy-MM-dd HH:mm:ss");

        /// <summary>
        /// 结束有效时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 结束有效时间
        /// </summary>
        public string EndTimeStr => EndTime.ToString("yyyy-MM-dd HH:mm:ss");

        /// <summary>
        /// 兑换时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 兑换时间
        /// </summary>
        public string CreateTimeStr => CreateTime.ToString("yyyy-MM-dd HH:mm:ss");

        /// <summary>
        /// 用户id
        /// </summary>
        public int UserId { get; set; }


        /// <summary>
        /// 是否使用
        /// </summary>
        public bool IsUse { get; set; }

        /// <summary>
        /// 优惠券来源
        /// </summary>
        public CouponSourceEnum Source { get; set; }
        /// <summary>
        /// 优惠券来源
        /// </summary>
        public string SourceStr => Source.GetDescription();

        /// <summary>
        /// 优惠券号
        /// </summary>
        public string CouponNumber { get; set; } 

        /// <summary>
        /// 会员号
        /// </summary>
        public string UserNumber { get; set; }
    }
}
